/*
**  File MenuTypes.h
*/
#ifndef MENUTYPESh
#define MENUTYPESh

#define    item_STOP    900
#define    item_END     901
#define    item_QUIT    902
#define    item_NONE    903
#define    item_EXEC    904
#define    item_SET     905
#define    item_SETS    906
#define    item_NULL    998
#define    item_ERROR   999

#define    size_OPTIONWORD 16

enum { menu_warn, menu_fatal };

enum itemstatus { off, on };

enum datatype { none, logical, integer, real, oneword, string };

typedef union
{
    int     i;
    float   r;
    char    *s;
}
UniData;

typedef struct menu Menu;

typedef struct
{
    int             item;
    char            *key;
    enum datatype   type;
    enum itemstatus status;
    Menu            *menu;
    char            word[size_OPTIONWORD];  /* used to store whole words */
    UniData         value;                  /* used to store int, float, or
                                               pointer to char */
    int		    subitem;
}
MenuItem;

typedef MenuItem  OptionItem;

struct menu
{
    char        *title;
    char        *object;
    char        *prompt;
    int         size;
    MenuItem    *items;
};

#endif
